package com.jiyun.service;

import com.jiyun.mapper.UserMapper;
import com.jiyun.bean.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public User getQueryByid(Long id){
        return userMapper.selectByPrimaryKey(id);
    }

    @Transactional
    public void insert(User user){
        userMapper.insert(user);
    }



}
